﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cos.Core.NHibernate;

using NUnit.Framework;

namespace Cos.Module.Form.NHibernate.Test
{
    using Cos.Core.NHibernate.Tests;

    [TestFixture]
    public class SubmissionDataModelFixture : ModuleFixtureBase
    {
        [Test]
        public void CanMapSubmissionDataModel()
        {
            new PersistenceSpecification<SubmissionDataModel>(Session)
                //.CheckReference(x => x.CultureCode, this.Culture.Id)
                .CheckProperty(x => x.Email, "email")
                .CheckProperty(x => x.FormId, 1)
                .CheckProperty(x => x.IP, "127.0.0.1")
                .CheckProperty(x => x.PageUrl, "page url")
                .CheckProperty(x => x.ReferenceUrl, "reference url")
                .CheckProperty(x => x.SubmissionDate, new DateTime(2011, 01, 04))
                //.CheckComponentList(x => x.SubmissionValues, new List<SubmissionValueDataModel>())
                .CheckProperty(x => x.UserAgent, "user agent")
                .CheckProperty(x => x.UserName, "user name")
                .CheckProperty(x => x.UserPKID, new Guid())
                .VerifyTheMappings();
        }
    }
}
